﻿<Page
    x:Name="pageRoot"
    ManipulationMode="System"
    x:Class="PiXeL_Apps.VerschillendeInspecties"
    DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:PiXeL_Apps"
    xmlns:common="using:PiXeL_Apps.Common"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" NavigationCacheMode="Enabled">

    <Page.Resources>
        <common:DataTemplateKiezer
            x:Key="DataTemplateKiezer"
            VoltooideInspectieTemplate="{StaticResource voltooideInspectieTemplate}"
            OnvoltooideInspectieTemplate="{StaticResource onvoltooideInspectieTemplate}"
            StandaardInspectieTemplate="{StaticResource inspectieTemplate}"
            BelangrijkInspectieTemplate="{StaticResource attentieInspectieTemplate}"
            DringendInspectieTemplate="{StaticResource dringendInspectieTemplate}"/>
    </Page.Resources>

    <!--
        This grid acts as a root panel for the page that defines two rows:
        * Row 0 contains the back button and page title
        * Row 1 contains the rest of the page layout
    -->
    <Grid x:Name="paginaGrid"  ManipulationMode="All" Background="{StaticResource DefaultBackgroundColor}">
        <Grid.ChildrenTransitions>
            <TransitionCollection>
                <EntranceThemeTransition/>
            </TransitionCollection>
        </Grid.ChildrenTransitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="140"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!-- Back button and page title -->
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="120"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>

            <Button x:Name="backButton" Margin="39,59,39,0" Command="{Binding NavigationHelper.GoBackCommand, ElementName=pageRoot}"
                        Style="{StaticResource NavigationBackButtonNormalStyle}"
                        Click="BackButton_Click"
                        VerticalAlignment="Top"
                        AutomationProperties.Name="Back"
                        AutomationProperties.AutomationId="BackButton"
                        AutomationProperties.ItemType="Navigation Button"/>
            <TextBlock x:Name="pageTitle" Text="Verschillende inspecties" Style="{StaticResource HeaderTextBlockStyle}" Grid.Column="1" 
                        IsHitTestVisible="false" TextWrapping="NoWrap" VerticalAlignment="Bottom" Margin="0,0,316,40" FontFamily="Global User Interface"/>
        </Grid>
        <Button x:Name="btnOpmerkingen" Grid.Row="1" Height="140" Width="320" Background="Transparent" FontWeight="Normal" Click="BtnOpmerkingen_Click"
            HorizontalAlignment="Right" Margin="0,48,10,440" >
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="100"/>
                    <ColumnDefinition Width="150"/>
                </Grid.ColumnDefinitions>
                <TextBlock x:Name="lblOpmerkingenIcoon" Text="&#xE171;" FontSize="70" FontFamily="Segoe UI Symbol" Width="100" />
                <TextBlock x:Name="lblOpmerkingen" Text="Opmerkingen" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="24" FontFamily="Global User Interface" />
            </Grid>
        </Button>
        <Button x:Name="btnVerwerk" Grid.Row="1" Height="140" Width="320" Background="Transparent" FontWeight="Normal" Click="BtnVerwerk_Click"
                HorizontalAlignment="Right" Margin="0,206,10,282" >
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="100"/>
                    <ColumnDefinition Width="150"/>
                </Grid.ColumnDefinitions>
                <TextBlock x:Name="lblOverzichtIcoon" Text="&#xE16D;" FontSize="70" FontFamily="Segoe UI Symbol" Width="100" />
                <TextBlock x:Name="lblOverzicht" Text="Overzicht" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="24" FontFamily="Global User Interface" />
            </Grid>
        </Button>

        <Button x:Name="btnStop" Grid.Row="1" Height="140" Width="320" Background="Transparent" FontWeight="Normal" Click="BtnStop_Click"
                HorizontalAlignment="Right" Margin="0,366,10,122">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="100"/>
                    <ColumnDefinition Width="150"/>
                </Grid.ColumnDefinitions>
                <TextBlock x:Name="lblStopIcoon" Text="&#xE10A;" FontSize="70" FontFamily="Segoe UI Symbol" Width="100" />
                <TextBlock x:Name="lblStop" Text="Stop" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="24" FontFamily="Global User Interface" />
            </Grid>
        </Button>
        <GridView x:Name="gvwInspecties" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Top"
            Height="547" ItemTemplateSelector="{StaticResource DataTemplateKiezer}"
            Style="{StaticResource PAGridViewStyle}" ItemContainerStyle="{StaticResource PAGridViewItemStyle}"
            SelectionMode="Multiple" IsItemClickEnabled="True" ItemClick="gvwInspecties_ItemClick" Margin="15,48,340,0"/>
        <TextBlock x:Name="lblTesten" Margin="15,10,340,0"
                   Text="Uit te voeren inspecties" FontSize="20" TextWrapping="Wrap" TextAlignment="Center"
                   VerticalAlignment="Top" HorizontalAlignment="Left"  RenderTransformOrigin="0.462,0.545" Grid.Row="1"/>

        <StackPanel Name="menuPanel" Grid.RowSpan="2" HorizontalAlignment="Left" VerticalAlignment="Stretch" Width="350" Height="{Binding Height, ElementName=page}">
        </StackPanel>
    </Grid>
</Page>